home *** CD-ROM | disk | FTP | other *** search
/ Freelog 115 / FreelogNo115-MaiJuin2013.iso / Internet / AvantBrowser / asetup.exe / _data / webkit / resources.pak / Unnamed File 000045.txt < prev    next >
Text File  |  2013-04-03  |  9KB  |  306 lines

  1. /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
  2.  * Use of this source code is governed by a BSD-style license that can be
  3.  * found in the LICENSE file. */
  4.  
  5. /* This file defines styles for form controls. The order of rule blocks is
  6.  * important as there are some rules with equal specificity that rely on order
  7.  * as a tiebreaker. These are marked with OVERRIDE. */
  8.  
  9. /* Default state **************************************************************/
  10.  
  11. :-webkit-any(button,
  12.              input[type='button'],
  13.              input[type='submit']):not(.custom-appearance):not(.link-button),
  14. select,
  15. input[type='checkbox'],
  16. input[type='radio'] {
  17.   -webkit-appearance: none;
  18.   -webkit-user-select: none;
  19.   background-image: -webkit-linear-gradient(#ededed, #ededed 38%, #dedede);
  20.   border: 1px solid rgba(0, 0, 0, 0.25);
  21.   border-radius: 2px;
  22.   box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08),
  23.       inset 0 1px 2px rgba(255, 255, 255, 0.75);
  24.   color: #444;
  25.   font: inherit;
  26.   margin: 0 1px 0 0;
  27.   text-shadow: 0 1px 0 rgb(240, 240, 240);
  28. }
  29.  
  30. :-webkit-any(button,
  31.              input[type='button'],
  32.              input[type='submit']):not(.custom-appearance):not(.link-button),
  33. select {
  34.   min-height: 2em;
  35.   min-width: 4em;
  36. /* The following platform-specific rule is necessary to get adjacent
  37.    * buttons, text inputs, and so forth to align on their borders while also
  38.    * aligning on the text's baselines. */
  39.   padding-bottom: 1px;
  40. }
  41.  
  42. :-webkit-any(button,
  43.              input[type='button'],
  44.              input[type='submit']):not(.custom-appearance):not(.link-button) {
  45.   -webkit-padding-end: 10px;
  46.   -webkit-padding-start: 10px;
  47. }
  48.  
  49. select {
  50.   -webkit-appearance: none;
  51.   -webkit-padding-end: 20px;
  52.   -webkit-padding-start: 6px;
  53.   /* OVERRIDE */
  54.   background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAICAYAAAAbQcSUAAAAaUlEQVQoz2P4//8/A7UwdkEGhiggTsODo4g2LBEImJmZvwE1/UfHIHGQPNGGAbHCggULFrKxsf1ENgjEB4mD5EnxJoaByAZB5Yk3DNlAPj6+L8gGkWUYzMC3b982IRtEtmFQjaxYxDAwAGi4TwMYKNLfAAAAAElFTkSuQmCC'),
  55.       -webkit-linear-gradient(#ededed, #ededed 38%, #dedede);
  56.   background-position: right center;
  57.   background-repeat: no-repeat;
  58. }
  59.  
  60. html[dir='rtl'] select {
  61.   background-position: center left;
  62. }
  63.  
  64. input[type='checkbox'] {
  65.   bottom: 2px;
  66.   height: 13px;
  67.   position: relative;
  68.   vertical-align: middle;
  69.   width: 13px;
  70. }
  71.  
  72. input[type='radio'] {
  73.   /* OVERRIDE */
  74.   border-radius: 100%;
  75.   bottom: 3px;
  76.   height: 15px;
  77.   position: relative;
  78.   vertical-align: middle;
  79.   width: 15px;
  80. }
  81.  
  82. /* TODO(estade): add more types here? */
  83. input[type='password'],
  84. input[type='search'],
  85. input[type='text'],
  86. input[type='url'],
  87. input:not([type]),
  88. textarea {
  89.   border: 1px solid #bfbfbf;
  90.   border-radius: 2px;
  91.   box-sizing: border-box;
  92.   color: #444;
  93.   font: inherit;
  94.   margin: 0;
  95.   /* Use min-height to accommodate addditional padding for touch as needed. */
  96.   min-height: 2em;
  97.   padding: 3px;
  98. /* For better alignment between adjacent buttons and inputs. */
  99.   padding-bottom: 4px;
  100. }
  101.  
  102. input[type='search'] {
  103.   -webkit-appearance: textfield;
  104.   /* NOTE: Keep a relatively high min-width for this so we don't obscure the end
  105.    * of the default text in relatively spacious languages (i.e. German). */
  106.   min-width: 160px;
  107. }
  108.  
  109. /* Remove when https://bugs.webkit.org/show_bug.cgi?id=51499 is fixed.
  110.  * TODO(dbeam): are there more types that would benefit from this? */
  111. input[type='search']::-webkit-textfield-decoration-container {
  112.   direction: inherit;
  113. }
  114.  
  115. /* Checked ********************************************************************/
  116.  
  117. input[type='checkbox']:checked::before {
  118.   -webkit-user-select: none;
  119.   background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAcklEQVQY02NgwA/YoJgoEA/Es4DYgJBCJSBeD8SboRinBiYg7kZS2IosyQ/Eakh8LySFq4FYHFlxGRBvBOJYqMRqJMU+yApNkSRAeC0Sux3dfSCTetE0wKyXxOWhMKhTYIr9CAUXyJMzgLgBagBBgDPGAI2LGdNt0T1AAAAAAElFTkSuQmCC');
  120.   background-size: 100% 100%;
  121.   content: '';
  122.   display: block;
  123.   height: 100%;
  124.   width: 100%;
  125. }
  126.  
  127. html[dir='rtl'] input[type='checkbox']:checked::before {
  128.   -webkit-transform: scaleX(-1);
  129. }
  130.  
  131. input[type='radio']:checked::before {
  132.   background-color: #666;
  133.   border-radius: 100%;
  134.   bottom: 3px;
  135.   content: '';
  136.   display: block;
  137.   left: 3px;
  138.   position: absolute;
  139.   right: 3px;
  140.   top: 3px;
  141. }
  142.  
  143. /* Hover **********************************************************************/
  144.  
  145. :enabled:hover:-webkit-any(
  146.     select,
  147.     input[type='checkbox'],
  148.     input[type='radio'],
  149.     :-webkit-any(
  150.         button,
  151.         input[type='button'],
  152.         input[type='submit']):not(.custom-appearance):not(.link-button)) {
  153.   background-image: -webkit-linear-gradient(#f0f0f0, #f0f0f0 38%, #e0e0e0);
  154.   border-color: rgba(0, 0, 0, 0.3);
  155.   box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12),
  156.       inset 0 1px 2px rgba(255, 255, 255, 0.95);
  157.   color: black;
  158. }
  159.  
  160. :enabled:hover:-webkit-any(select) {
  161.   /* OVERRIDE */
  162.   background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAICAYAAAAbQcSUAAAAaUlEQVQoz2P4//8/A7UwdkEGhiggTsODo4g2LBEImJmZvwE1/UfHIHGQPNGGAbHCggULFrKxsf1ENgjEB4mD5EnxJoaByAZB5Yk3DNlAPj6+L8gGkWUYzMC3b982IRtEtmFQjaxYxDAwAGi4TwMYKNLfAAAAAElFTkSuQmCC'),
  163.       -webkit-linear-gradient(#f0f0f0, #f0f0f0 38%, #e0e0e0);
  164. }
  165.  
  166. /* Active *********************************************************************/
  167.  
  168. :enabled:active:-webkit-any(
  169.     select,
  170.     input[type='checkbox'],
  171.     input[type='radio'],
  172.     :-webkit-any(
  173.         button,
  174.         input[type='button'],
  175.         input[type='submit']):not(.custom-appearance):not(.link-button)) {
  176.   background-image: -webkit-linear-gradient(#e7e7e7, #e7e7e7 38%, #d7d7d7);
  177.   box-shadow: none;
  178.   text-shadow: none;
  179. }
  180.  
  181. :enabled:active:-webkit-any(select) {
  182.   /* OVERRIDE */
  183.   background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAICAYAAAAbQcSUAAAAaUlEQVQoz2P4//8/A7UwdkEGhiggTsODo4g2LBEImJmZvwE1/UfHIHGQPNGGAbHCggULFrKxsf1ENgjEB4mD5EnxJoaByAZB5Yk3DNlAPj6+L8gGkWUYzMC3b982IRtEtmFQjaxYxDAwAGi4TwMYKNLfAAAAAElFTkSuQmCC'),
  184.       -webkit-linear-gradient(#e7e7e7, #e7e7e7 38%, #d7d7d7);
  185. }
  186.  
  187. /* Disabled *******************************************************************/
  188.  
  189. :disabled:-webkit-any(
  190.     button,
  191.     input[type='button'],
  192.     input[type='submit']):not(.custom-appearance):not(.link-button),
  193. select:disabled {
  194.   background-image: -webkit-linear-gradient(#f1f1f1, #f1f1f1 38%, #e6e6e6);
  195.   border-color: rgba(80, 80, 80, 0.2);
  196.   box-shadow: 0 1px 0 rgba(80, 80, 80, 0.08),
  197.       inset 0 1px 2px rgba(255, 255, 255, 0.75);
  198.   color: #aaa;
  199. }
  200.  
  201. select:disabled {
  202.   /* OVERRIDE */
  203.   background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAICAYAAAAbQcSUAAAAWklEQVQoz2P4//8/A7UwdkEGhiggTsODo4g2LBEIGhoa/uPCIHmiDQNihQULFizEZhBIHCRPijexGggzCCpPvGHoBiIbRJZhMAPfvn3bhGwQ2YZBNbJiEcPAAIgGZrTRc1ZLAAAAAElFTkSuQmCC'),
  204.       -webkit-linear-gradient(#f1f1f1, #f1f1f1 38%, #e6e6e6);
  205. }
  206.  
  207. input:disabled:-webkit-any([type='checkbox'],
  208.                            [type='radio']) {
  209.   opacity: .75;
  210. }
  211.  
  212. input:disabled:-webkit-any([type='password'],
  213.                            [type='search'],
  214.                            [type='text'],
  215.                            [type='url'],
  216.                            :not([type])) {
  217.   color: #999;
  218. }
  219.  
  220. /* Focus **********************************************************************/
  221.  
  222. :enabled:focus:-webkit-any(
  223.     select,
  224.     input[type='checkbox'],
  225.     input[type='password'],
  226.     input[type='radio'],
  227.     input[type='search'],
  228.     input[type='text'],
  229.     input[type='url'],
  230.     input:not([type]),
  231.     :-webkit-any(
  232.          button,
  233.          input[type='button'],
  234.          input[type='submit']):not(.custom-appearance):not(.link-button)) {
  235.   /* OVERRIDE */
  236.   -webkit-transition: border-color 200ms;
  237.   /* We use border color because it follows the border radius (unlike outline).
  238.    * This is particularly noticeable on mac. */
  239.   border-color: rgb(77, 144, 254);
  240.   outline: none;
  241. }
  242.  
  243. /* Link buttons ***************************************************************/
  244.  
  245. .link-button {
  246.   -webkit-box-shadow: none;
  247.   background: transparent none;
  248.   border: none;
  249.   color: rgb(17, 85, 204);
  250.   cursor: pointer;
  251.   /* Input elements have -webkit-small-control which can override the body font.
  252.    * Resolve this by using 'inherit'. */
  253.   font: inherit;
  254.   margin: 0;
  255.   padding: 0 4px;
  256. }
  257.  
  258. .link-button:hover {
  259.   text-decoration: underline;
  260. }
  261.  
  262. .link-button:active {
  263.   color: rgb(5, 37, 119);
  264.   text-decoration: underline;
  265. }
  266.  
  267. .link-button[disabled] {
  268.   color: #999;
  269.   cursor: default;
  270.   text-decoration: none;
  271. }
  272.  
  273. /* Checkbox/radio helpers ******************************************************
  274.  *
  275.  * .checkbox and .radio classes wrap labels. Checkboxes and radios should use
  276.  * these classes with the markup structure:
  277.  *
  278.  *   <div class="checkbox">
  279.  *     <label>
  280.  *       <input type="checkbox"></input>
  281.  *       <span>
  282.  *     </label>
  283.  *   </div>
  284.  */
  285.  
  286. :-webkit-any(.checkbox, .radio) label {
  287.   /* Don't expand horizontally: <http://crbug.com/112091>. */
  288.   display: -webkit-inline-box;
  289.   padding-bottom: 7px;
  290.   padding-top: 7px;
  291. }
  292.  
  293. :-webkit-any(.checkbox, .radio) label input ~ span {
  294.   -webkit-margin-start: 0.6em;
  295.   /* Make sure long spans wrap at the same horizontal position they start. */
  296.   display: block;
  297. }
  298.  
  299. :-webkit-any(.checkbox, .radio) label:hover {
  300.   color: black;
  301. }
  302.  
  303. label > input:disabled:-webkit-any([type='checkbox'], [type='radio']) ~ span {
  304.   color: #999;
  305. }
  306.